package org.jjche.demo.modules.student.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jjche.common.annotation.transform.TransformDict;
import org.jjche.common.annotation.transform.TransformEnum;
import org.jjche.common.enums.UserGenderEnum;
import org.jjche.demo.modules.student.transform.classes.TransformClass;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * <p>
 * 学生
 * </p>
 *
 * @author miaoyj
 * @version 1.0.0-SNAPSHOT
 * @since 2021-02-02
 */
@Data
public class StudentVO implements Serializable {
    private Long id;
    @ApiModelProperty(value = "姓名")
    private String name;

    /**
     * 枚举转换
     */
    @ApiModelProperty(value = "性别")
    @TransformEnum
    private UserGenderEnum sex;
    private String sexName;

    /**
     * 自定义转换
     */
    @ApiModelProperty(value = "班级")
    @TransformClass("className")
    private Long classId;
    private String className;

    /**
     * 字典转换
     * 指定输出字段
     */
    @ApiModelProperty(value = "爱好")
    @TransformDict(group = "hobby")
    private String hobby;
    private String hobbyName;

    @ApiModelProperty(value = "创建时间", dataType = "java.lang.String")
    private Timestamp gmtCreate;
}
